#ifndef _WS2812_H
#define _WS2812_H

#ifdef __cplusplus
extern "C"
{
#endif
#include "main.h"

#define PIXEL_PER_CHAN 1024                         // 单通道最大LED数量
#define BUF_SIZE_PER_CHAN (PIXEL_PER_CHAN * 3)      // 单通道数据缓冲区大小
#define CHAN_MAX 8                                  // 控制器支持的通道总数
#define SEND_BIT_SEND_SIZE (BUF_SIZE_PER_CHAN * 8)  // 发送位数据的缓冲区大小

extern uint8_t led_send_done;
extern uint16_t g_led_chn_count;
extern uint8_t led_driver_bitstream[SEND_BIT_SEND_SIZE];

int ws2812_init(void);
void ws2812_send_data(uint32_t buffersize);


#ifdef __cplusplus
}
#endif

#endif /* _WS2812_H */
